package cn.chenfeifx.example;

import cn.chenfeifx.core.common.ResourcesLoader;
import cn.chenfeifx.core.controls.CFHeader;
import cn.chenfeifx.core.controls.CFStage;
import cn.chenfeifx.example.ui.Index;
import javafx.application.Application;
import javafx.application.HostServices;
import javafx.stage.Stage;

public class ExampleApp extends Application {

    public static HostServices hostServices;

    @Override
    public void start(Stage primaryStage) {
        hostServices = getHostServices();

        //基础尺寸
        CFStage stage = new CFStage(new Index(), 800, 500)
                .setHeaderStyle(CFHeader.HeaderStyle.CLOSE)
                .setBackdropImage(ResourcesLoader.loadFxImage("/img/backdrop.png"));
        stage.show();
    }
}